<%@ page import="com.po.GoodsSingle" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    ArrayList<GoodsSingle> goods = (ArrayList<GoodsSingle>) session.getAttribute("goodslist");
    String name = (String)request.getParameter("newname");
    String p = (String) request.getParameter("newprice");
    float price = Float.parseFloat(p);
    GoodsSingle g = new GoodsSingle();
    g.setName(name);g.setPrice(price);
    goods.add(g);
    session.setAttribute("goodslist",goods);
    response.sendRedirect("addGoods.jsp");
%>
